treeview: Reset multipress controller after 2nd click
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 27 Aug 2014 12:36:53 +0000 (14:36 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 27 Aug 2014 15:12:52 +0000 (17:12 +0200)
The pre-gestures code used to compare the current button press with the
previous one on !activate_on_single_click, and unset the previous event
data so ::row-activated would be emitted every 2 clicks.

So do the same with the multipress gesture and reset it after every 2nd
click to have ::row-activated emitted multiple times while manic clicking.

https://bugzilla.gnome.org/show_bug.cgi?id=735353

gtk/gtktreeview.c

index efaabfb33c26e1612b335bb2aba52273aa9c71a0..48cdede79f10c1a7ead40b538be32b815d5cc6f3 100644 (file)
@@ -3308,6 +3308,9 @@ gtk_tree_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
     }
 
   gtk_tree_path_free (path);
+
+  if (n_press >= 2)
+    gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture));
 }
 
 static void